const Koa = require('koa');
const app = new Koa();

app.use(async ctx => {
  if (ctx.request.path !== '/') {
    ctx.response.redirect('/');
    ctx.response.body = 'not found'
  };
  ctx.response.body = '<a href="/">Index Page</a>';
});

app.listen(9000);